#ifndef _SYSTEM_H
#define _SYSTEM_H

#define TRUE 1
#define FALSE 0
#define BACKLOG 10
#define MAXPLAYERS 10

#define PORT 6110

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <pthread.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <math.h>

struct lobby {

    int player_id;
    pthread_t player_thread;
    int player_socket;
    char player_name[50];
    char player_ip[16];
    int player_port;
    int challenge_player_id;
    int created_game;
    int character;
    int map;

} clients[MAXPLAYERS];

#include "client.h"

void set_lobby(struct lobby *clients);
int free_index(struct lobby *clients);
void make_demon(void);

#endif
